<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page isELIgnored="false"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
.btn1 {margin:2px;  width:120px; height:50px; border:#F00 1px; background:#A8A8A8; color:#FFF; border-radius:3px; font-size:18px}
.btn2 {margin:2px;  width:120px; height:50px; border:#F00 1px; background:#3399CC; color:#FFF; border-radius:3px; font-size:18px}
.btn3 {margin:2px;  width:120px; height:50px; border:#F00 1px; background:#006699; color:#FFF; border-radius:3px; font-size:18px}
.btn4 {margin:2px;  width:120px; height:50px; border:#F00 1px; background:#98FB98; color:#FFF; border-radius:3px; font-size:18px}
.detail {margin:2px;  width:60px; height:30px; border:#F00 1px; background:#339999; color:#FFF; border-radius:3px; font-size:14px}
</style>
<title>商家首页</title>
</head>
<body style="text-align:center;margin:0px auto;">
<h1>商家首页</h1>

<div>
<div style="text-align:right;margin-right: 100px"><a href="logout.action"><button class="btn1">退出登录</button> </a></div>
<div style="margin-top: 50px;text-align: center; margin:0px auto; width: 500px;height: 600px;">

<table style="margin-left: 40px">
	
	<tr>
		<td> <img width="200px" height="200px" heg src="../local/${sessionScope.merchant.mHeadImg}"/> </td>
		<td colspan="2" style="padding-left:20px">
			<table >
				<tr>
					<td >账号 ： </td>
					<td>${sessionScope.merchant.mName}</td>
				</tr>
				<tr>
					<td>地址 ： </td>
					<td>${sessionScope.merchant.mAddr}</td>
				</tr>
				<tr>
					<td>状态 ： </td>
					<c:if test="${sessionScope.merchant.mStatus==0}">
						<td bgcolor="#FFFF00">待审核</td>
					</c:if>
					<c:if test="${sessionScope.merchant.mStatus==1}">
						<td bgcolor="#7CFC00">审核通过</td>
					</c:if>
					<c:if test="${sessionScope.merchant.mStatus==2}">
						<td bgcolor="#FF4500">驳回</td>
					</c:if>
					
				</tr>
			</table>
		</td>
	</tr>
	<c:if test="${sessionScope.merchant.mStatus==2}">
	<tr>
		<td>驳回理由：</td>
		<td colspan="2" style="word-break : break-all;color:red"> ${feedback } </td>
	</tr>
	</c:if>
	
	<tr>
		<td> 
			<c:if test="${sessionScope.merchant.mStatus==1}">
				<a href="dishes/list"> <button class="btn4">菜品管理</button></a>
			</c:if>
		</td>
		<td>
				<c:if test="${sessionScope.merchant.mStatus!=1}">
				<a href="getState.action"><button class="btn2">获取审核状态</button> </a>
				</c:if>
		</td>
		<td>
			<c:if test="${sessionScope.merchant.mStatus!=1}">
				<a href="applyStore"><button class="btn3">申请开店</button></a>
			</c:if>
		</td>
	</tr>
</table>

</div>

</div>


</body>
</html>